Send some form info to a PHP page to be processed without going to that page? [closed]

Posted by zuko on Pro Webmasters See other posts from Pro Webmasters or by zuko
Published on 2012-09-14T00:29:52Z Indexed on 2012/09/14 15:50 UTC
Read the original article Hit count: 152

Filed under:
|
|
|

Okay, so I'm not very familiar with php.

I have a very simple form, just 2 text fields. All I want to do is, after validating with JavaScript, send these two string fields in an email to a pre-defined email address.

I understand how JavaScript works on the client side; you can respond to user events, etc. And PHP is server-side. What I'm having trouble grasping and figuring out is how do I run PHP functions, etc when I want?

I figured out how to use the 'action' attribute of the form to send the data via POST to another PHP page. But this simply opens that page. I don't want to open the page I just want to do some processing and send a message back to the page the user is still on. How do I go about something like that?

Thanks.

© Pro Webmasters or respective owner

Related posts about php

Related posts about forms